import Vue from 'vue'
import App from './App.vue'
// 引入路由文件
import router from '@/router/';
import store from '@/store/';
// 引入
import TypeNav from '@/pages/Home/TypeNav';        
import Carousel from '@/components/Carousel';
import MyPagination from '@/components/MyPagination';
import '@/mock/mockService';
import 'swiper/css/swiper.css';
import { Button,Message,MessageBox,Pagination } from 'element-ui';
import * as API from '@/api'; //全局接口
Vue.config.productionTip = false;
//全局组件
Vue.component(TypeNav.name,TypeNav);
Vue.component(Carousel.name,Carousel);
Vue.component(MyPagination.name,MyPagination);
//element-ui
Vue.component(Button.name,Button); 
Vue.component(MessageBox.name,MessageBox); 
Vue.component(Pagination.name,Pagination);

new Vue({
  render: h => h(App),
  store,
  router,//全局路由
  beforeCreate() {
    Vue.prototype.$bus = this;
    Vue.prototype.$API = API;
    Vue.prototype.$alert = MessageBox.alert;
    Vue.prototype.$confirm = MessageBox.confirm;
    Vue.prototype.$message = Message;
  },
  
}).$mount('#app')
